chore: improvements to new code connect templates & build setups#742
Merged
Conversation
Collaborator
✅ Heimdall Review Status
✅
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
✅
1/1
|
Denominator calculation
|
…fix changelog detection
Rooted in a single discovery: the Figma Code Connect batch JSON
(`icons.figma.batch.json`) was leaking into published `esm/` builds.
Investigation revealed `--copy-files` in our babel build commands copies
non-compilable files (.json, .md) unconditionally — the babel `ignore`
list and `--no-copy-ignored` flag have no effect on them. This led to a
broader audit of what else was slipping through.
Build (esm output)
- Remove `--copy-files --no-copy-ignored` from babel build commands in
web, mobile, common, utils, web-visualization, mobile-visualization,
web-utils, docusaurus-plugin-kbar, docusaurus-plugin-llm-dev-server,
and figma-api. None of these packages import non-JS assets at runtime,
so the flag served no purpose and was copying figma batch JSONs and
stray READMEs into the published build.
Changelog / version-bump detection
- Expand `DEV_FILES_REGEX` in `tools/ci/getAffectedPackages.mjs` to
match figma batch files (`*.figma.batch.ts/json`) and to treat the
standard test/dev directories (`__tests__`, `__stories__`, `__mocks__`,
`__fixtures__`) as dev-only — not just `__stories__` as before. This
means test helpers, fixtures, and perf tests inside those dirs no longer
falsely flag a package for a changelog entry.
Test runner consistency
- Switch `packages/mobile` test target from `@nx/jest:jest` executor to
`nx:run-commands` (`jest --maxWorkers=75%`, `cwd: {projectRoot}`),
making it identical to the web test target.
Perf test relocation
- Move component-config reassure benchmarks from `src/perf/component-config/`
into `src/__tests__/perf/component-config/` (web + mobile) so the
existing `**/__tests__/**` ignore globs handle them — no special-casing
needed in babel or tsconfig. Update `perf:component-config` script paths.
Note: the script itself remains a known-broken manual benchmark (pre-existing
rot, unrelated to these changes); tracked in CDS-2196.
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
| id: 'icon-coinbaseCardProduct-mobile', | ||
| id: `icon-${figma.batch.name}-mobile`, | ||
| metadata: { nestable: true }, | ||
| }; |
Moving `*.perf-test.tsx` files into `__tests__/` dirs (for correct build
exclusion) caused them to match the `**/__tests__/**` ESLint config block,
which applies the jest plugin including `jest/expect-expect`. Reassure
benchmarks use `measurePerformance` instead of `expect()` by design, so
this rule fires incorrectly on all perf tests.
Adds a `**/*.perf-test.{ts,tsx}` override to turn off `jest/expect-expect`
globally (mirroring the existing migrator override), and removes the now-
redundant inline `// eslint-disable` comments that were previously added
as workarounds in the 21 perf-test files already living in `__tests__/`.
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
adrienzheng-cb
previously approved these changes
Jun 5, 2026
adrienzheng-cb
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
Biggest improvement here is the refactor to figma template batch files which dramatically reduce the number of files needed to keep code connect mappings for the CDS icon library
Other changes
Rooted in a single discovery: the Figma Code Connect batch JSON
(
icons.figma.batch.json) was leaking into publishedesm/builds.Investigation revealed
--copy-filesin our babel build commands copiesnon-compilable files (.json, .md) unconditionally — the babel
ignorelist and
--no-copy-ignoredflag have no effect on them. This led to abroader audit of what else was slipping through.
Build (esm output)
--copy-files --no-copy-ignoredfrom babel build commands inweb, mobile, common, utils, web-visualization, mobile-visualization,
web-utils, docusaurus-plugin-kbar, docusaurus-plugin-llm-dev-server,
and figma-api. None of these packages import non-JS assets at runtime,
so the flag served no purpose and was copying figma batch JSONs and
stray READMEs into the published build.
Changelog / version-bump detection
DEV_FILES_REGEXintools/ci/getAffectedPackages.mjstomatch figma batch files (
*.figma.batch.ts/json) and to treat thestandard test/dev directories (
__tests__,__stories__,__mocks__,__fixtures__) as dev-only — not just__stories__as before. Thismeans test helpers, fixtures, and perf tests inside those dirs no longer
falsely flag a package for a changelog entry.
Test runner consistency
packages/mobiletest target from@nx/jest:jestexecutor tonx:run-commands(jest --maxWorkers=75%,cwd: {projectRoot}),making it identical to the web test target.
Perf test relocation
src/perf/component-config/into
src/__tests__/perf/component-config/(web + mobile) so theexisting
**/__tests__/**ignore globs handle them — no special-casingneeded in babel or tsconfig. Update
perf:component-configscript paths.Note: the script itself remains a known-broken manual benchmark (pre-existing
rot, unrelated to these changes); tracked in CDS-2196.
Generated with Claude Code
Root cause (required for bugfixes)
UI changes
Testing
How has it been tested?
Testing instructions
Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false